A novel algorithm to determine the leaf (leaves) of a binary tree from its preorder and postorder traversals
Authors
Abstract:
Binary trees are essential structures in Computer Science. The leaf (leaves) of a binary tree is one of the most significant aspects of it. In this study, we prove that the order of a leaf (leaves) of a binary tree is the same in the main tree traversals; preorder, inorder, and postorder. Then, we prove that given the preorder and postorder traversals of a binary tree, the leaf (leaves) of a binary tree can be determined. We present the algorithm BT-LEAF, a novel one, to detect the leaf (leaves) of a binary tree from its preorder and postorder traversals in quadratic time and linear space.
similar resources
An improved algorithm to reconstruct a binary tree from its inorder and postorder traversals
It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...
full textAn improved algorithm to reconstruct a binary tree from its inorder and postorder traversals
It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...
full textwuthering heights and the concept of marality/a sociological study of the novel
to discuss my point, i have collected quite a number of articles, anthologies, and books about "wuthering heights" applying various ideas and theories to this fantastic story. hence, i have come to believe that gadamer and jauss are rightful when they claim that "the individaul human mind is the center and origin of all meaning," 3 that reading literature is a reader-oriented activity, that it ...
15 صفحه اولfrom linguistics to literature: a linguistic approach to the study of linguistic deviations in the turkish divan of shahriar
chapter i provides an overview of structural linguistics and touches upon the saussurean dichotomies with the final goal of exploring their relevance to the stylistic studies of literature. to provide evidence for the singificance of the study, chapter ii deals with the controversial issue of linguistics and literature, and presents opposing views which, at the same time, have been central to t...
15 صفحه اولConstructing a binary tree efficiently from its traversals
In this note we streamline an earlier algorithm for constructing a binary tree from its inorder and preorder traversals. The new algorithm is conceptually simpler than the earlier algorithms and its time complexity has a smaller constant factor.
full textIterative Method for Recreating a Binary Tree from its Traversals
Many reconstruction algorithms for binary tree have been discussed in this paper. A particular focus of this paper is on “A new Non-Recursive Algorithm for Reconstructing a Binary Tree from its Traversals”. The computation time required for executing the reconstruction algorithm are O(N) and space complexity is O(NlogN) where N is the number of nodes in the binary tree. This algorithm works wel...
full textMy Resources
Journal title
volume 49 issue 2
pages 1- 11
publication date 2017-11-30
By following a journal you will be notified via email when a new issue of this journal is published.
Hosted on Doprax cloud platform doprax.com
copyright © 2015-2023